﻿using GN.Pay.Client.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GN.Pay.AbpClient
{
    /// <summary>
    /// 支付客户端配置领域服务
    /// </summary>
    public class PayClientConfigureDomainService : IPayClientConfigureDomainService
    {
        /// <summary>
        /// 支付 AppId
        /// </summary>
        public const string AppId_SettingName = PayConfigureUtils.AppId_SettingName;
        /// <summary>
        /// 支付 AppKey
        /// </summary>
        public const string AppKey_SettingName = PayConfigureUtils.AppKey_SettingName;
        /// <summary>
        /// 支付 MerchantId
        /// </summary>
        public const string AppMerchantId_SettingName = PayConfigureUtils.AppMerchantId_SettingName;
        /// <summary>
        /// 支付 ServerUrl
        /// </summary>
        public const string AppServerUrl_SettingName = PayConfigureUtils.AppServerUrl_SettingName;
        
        /// <summary>
        /// 获取AppId
        /// </summary>
        public string AppId
        {
            get
            {
                return PayConfigureUtils.GetAppSetting(AppId_SettingName);
            }
        }

        /// <summary>
        /// 获取AppKey
        /// </summary>
        public string AppKey
        {
            get
            {
                return PayConfigureUtils.GetAppSetting(AppKey_SettingName);
            }
        }

        /// <summary>
        /// 获取MerchantId
        /// </summary>
        public string MerchantId
        {
            get
            {
                return PayConfigureUtils.GetAppSetting(AppMerchantId_SettingName);
            }
        }

        /// <summary>
        /// 获取服务器url
        /// </summary>
        public string ServerUrl
        {
            get
            {
                return PayConfigureUtils.GetAppSetting(AppServerUrl_SettingName);
            }
        }
    }
}
